package permissions

import (
	"context"
	"goAdminV1/api/permissions/v1"
	"goAdminV1/internal/model"
	"goAdminV1/utility"
)

func (c *ControllerV1) JobDelete(ctx context.Context, req *v1.JobDeleteReq) (res *v1.JobDeleteRes, err error) {
	err = model.JobDelete(ctx, req.ID)
	if err != nil {
		return nil, utility.Error(utility.CodeOperation, err)
	}
	return &v1.JobDeleteRes{
		Message: "岗位删除成功",
	}, nil
}
